package com.qfedu.smart_community.entity;

import java.io.Serializable;
import java.util.List;

/**
 * 
 * @TableName dong
 */
public class Dong implements Serializable {
    /**
     * 楼栋id
     */
    private Integer dongId;

    /**
     * 楼栋名称:A栋  B栋......
     */
    private String dongName;

    /**
     * 小区id
     */
    private Integer houseId;

    //关联属性
    private List<Room> rooms;

    public List<Room> getRooms() {
        return rooms;
    }

    public void setRooms(List<Room> rooms) {
        this.rooms = rooms;
    }

    private static final long serialVersionUID = 1L;

    /**
     * 楼栋id
     */
    public Integer getDongId() {
        return dongId;
    }

    /**
     * 楼栋id
     */
    public void setDongId(Integer dongId) {
        this.dongId = dongId;
    }

    /**
     * 楼栋名称:A栋  B栋......
     */
    public String getDongName() {
        return dongName;
    }

    /**
     * 楼栋名称:A栋  B栋......
     */
    public void setDongName(String dongName) {
        this.dongName = dongName;
    }

    /**
     * 小区id
     */
    public Integer getHouseId() {
        return houseId;
    }

    /**
     * 小区id
     */
    public void setHouseId(Integer houseId) {
        this.houseId = houseId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Dong other = (Dong) that;
        return (this.getDongId() == null ? other.getDongId() == null : this.getDongId().equals(other.getDongId()))
            && (this.getDongName() == null ? other.getDongName() == null : this.getDongName().equals(other.getDongName()))
            && (this.getHouseId() == null ? other.getHouseId() == null : this.getHouseId().equals(other.getHouseId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDongId() == null) ? 0 : getDongId().hashCode());
        result = prime * result + ((getDongName() == null) ? 0 : getDongName().hashCode());
        result = prime * result + ((getHouseId() == null) ? 0 : getHouseId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", dongId=").append(dongId);
        sb.append(", dongName=").append(dongName);
        sb.append(", houseId=").append(houseId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}